﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Communication
{
    public class DeliveryControl:ControlBase
    {
        string mA, mB, mD;
         /// <summary>
        /// 构造函数，设定命令
        /// </summary>
        public DeliveryControl()
        {
            mCanId = Can.DW_R1_SA_ID;
            mA = "CA";
            mB = "CB";
            mD = "CD";
            mSCmd = new Dictionary<int, string>();
            mSCmd.Add(0, mA);
            mSCmd.Add(1, mB);
            mSCmd.Add(2, mD);

        }

        /// <summary>
        /// 复位
        /// </summary>
        public int Reset()
        {
            SendCmd(0, mA);
            mStatus = -100;
            return 0;
        }
        /// <summary>
        /// 进样
        /// </summary>
        public int CupIn()
        {
            SendCmd(1, mB);
            mStatus = -1;
            return 1;
        }
        /// <summary>
        /// 回2000步
        /// </summary>
        public int Back2000()
        {
            SendCmd(2, mD);
            mStatus = -2;
            return 2;
        }
    }
}
